﻿        function SearchProduct(path) 
        {
	        var handle = window.showModalDialog(path+'DialogBoxHostFrame.aspx?url=SearchProduct.aspx?p=0', window,'status:off;center=yes;edge:raised;dialogHeight:500px;dialogWidth:600px;help:0;resizable:0;scrollbar=0');	 
	        if (handle != null && handle != '' && typeof handle != 'undefined') {
	            //__doPostBack("SearchProduct",handle);
	            setValue(handle);
	        }
        }
        function SearchProduct_S(path) 
        {
	        var handle = window.showModalDialog(path+'DialogBoxHostFrame.aspx?url=SearchProduct_S.aspx?p=0', window,'status:off;center=yes;edge:raised;dialogHeight:500px;dialogWidth:600px;help:0;resizable:0;scrollbar=0');	 
	        if (handle != null && handle != '' && typeof handle != 'undefined') {
	            //alert(handle);
	            //__doPostBack("SearchProduct_S",handle);
	            setValue(handle);
	        }
        }     
        function SearchProduct_Report(path) 
        {
	        var handle = window.showModalDialog(path+'DialogBoxHostFrame.aspx?url=SearchProduct_Report.aspx?p=0', window,'status:off;center=yes;edge:raised;dialogHeight:500px;dialogWidth:600px;help:0;resizable:0;scrollbar=0');	 
	        if (handle != null && handle != '' && typeof handle != 'undefined') {
	            //alert(handle);
	            //__doPostBack("SearchProduct_S",handle);
	            setValue(handle);
	        }
        }    
        function SearchProductDM(path) 
        {
	        var handle = window.showModalDialog(path+'DialogBoxHostFrame.aspx?url=SearchProduct.aspx?p=1', window,'status:off;center=yes;edge:raised;dialogHeight:500px;dialogWidth:600px;help:0;resizable:0;scrollbar=0');	 
	        if (handle != null && handle != '' && typeof handle != 'undefined') {
	            //__doPostBack("SearchProduct",handle);
	            setValue(handle);
	        }
        }        
        function SearchVIP(path) 
        {
	        var handle = window.showModalDialog(path+'DialogBoxHostFrame.aspx?url=SearchVIP.aspx', window,'status:off;center=yes;edge:raised;dialogHeight:500px;dialogWidth:750px;help:0;resizable:0;scrollbar=0');	 
	        if (handle != null && handle != '' && typeof handle != 'undefined') {
	            //__doPostBack("SearchProduct",handle);
	            if(handle=="0")
	            {
	            window.parent.frmright.location="../CustomerArchives/AddVIP.aspx?isorder=1";
	            }
	            else
	            {
	            setVIPValue(handle);
	            }
	        }
        }  
        
        function BatchSelectingVip(path) 
        {
	        var handle = window.showModalDialog(path+'DialogBoxHostFrame.aspx?url=BatchSelectingVip.aspx?p=0', window,'status:off;center=yes;edge:raised;dialogHeight:500px;dialogWidth:600px;help:0;resizable:0;scrollbar=0');	 
	        if (handle != null && handle != '' && typeof handle != 'undefined') {
	            //__doPostBack("SearchProduct",handle);
	            if(handle=="0")
	            {
	                 window.parent.frmright.location="../CustomerArchives/AddVIP.aspx?isorder=1";
	            }
	            else
	            {
	                setVIPValue(handle);
	            }
	        }
        }  
        
        function SearchStatisticsProducts(path,type) 
        {
	        var handle = window.showModalDialog(path+'DialogBoxHostFrame.aspx?url=SearchStatisticsProducts.aspx?p=0', window,'status:off;center=yes;edge:raised;dialogHeight:500px;dialogWidth:600px;help:0;resizable:0;scrollbar=0');	 
	        if (handle != null && handle != '' && typeof handle != 'undefined') {
	            //__doPostBack("SearchProduct",handle);
	            if(type=="orderDoc")
	            {
	                setOrderDocValue(handle);
	            }
	            else if(type=="returnDoc")
	            {
	                setReturnDocValue(handle);
	            }
	            
	        }
        }
        
               